# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-kiwisolver
pkgver=1.4.5
_commit=03adafeb0f1188e34cde4c7ca8fe384912bd9e1b
pkgrel=1
pkgdesc="A fast implementation of the Cassowary constraint solver"
url="https://github.com/nucleic/kiwi"
license=('PerlArtistic')
arch=('loong64' 'x86_64')
depends=('python')
makedepends=('git' 'python-cppy' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest-runner')
source=("git+https://github.com/nucleic/kiwi.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd kiwi
  python setup.py build
}

check() {
  cd kiwi
  PYTHONPATH="$PWD"/py \
  python setup.py pytest
}

package() {
  cd kiwi
  python setup.py install --root="$pkgdir" --optimize=1
}
